﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package org.aswing.plaf.basic.background {
    import flash.display.*;
    import flash.geom.*;
    import org.aswing.*;
    import flash.filters.*;
    import org.aswing.geom.*;
    import org.aswing.plaf.*;
    import org.aswing.graphics.*;
    import org.aswing.plaf.basic.*;

    public class TableHeaderBackground implements GroundDecorator, UIResource {

        protected var shape:Shape;

        public function TableHeaderBackground(){
            this.shape = new Shape();
        }
        public function getDisplay(_arg1:Component):DisplayObject{
            return (this.shape);
        }
        public function updateDecorator(_arg1:Component, _arg2:Graphics2D, _arg3:IntRectangle):void{
            var _local4:ASColor;
            var _local5:StyleTune;
            var _local6:StyleResult;
            var _local7:IntRectangle;
            var _local8:IntRectangle;
            var _local9:Matrix;
            this.shape.graphics.clear();
            if (_arg1.isOpaque()){
                _arg2 = new Graphics2D(this.shape.graphics);
                _local4 = _arg1.getBackground();
                _local5 = _arg1.getStyleTune();
                _local6 = new StyleResult(_local4, _local5);
                _local7 = _arg3.clone();
                _local8 = _arg3.clone();
                _arg3.clone().height = (_local8.height + (_local6.round * 2));
                BasicGraphicsUtils.fillGradientRoundRect(_arg2, _local8, _local6, (Math.PI / 2), false, _local7);
                _local9 = new Matrix();
                _local9.createGradientBox(_arg3.width, _arg3.height, (Math.PI / 2), _arg3.x, _arg3.y);
                _arg2.fillRoundRect(new GradientBrush(GradientBrush.LINEAR, [0xFFFFFF, 0xFFFFFF], [0.2, 0.04], [0, 0xFF], _local9), _arg3.x, _arg3.y, _arg3.width, ((_arg3.height / 2) - 1), _local6.round, _local6.round, 0, 0);
                this.shape.filters = [new BevelFilter(1, 90, 0xFFFFFF, _local6.shadow, 0, _local6.shadow, 1, 1, 1, 1, BitmapFilterType.INNER)];
            };
            this.shape.visible = _arg1.isOpaque();
        }

    }
}//package org.aswing.plaf.basic.background 
